<?php
/* @var $this ProjectController */
/* @var $model Project */

?>


<script type="text/javascript">
$(function() {
	showReport(<?=$model->projectID?>);
	showAttachment(<?=$model->projectID?>);
	showNotifyStatus(<?=$model->projectID?>);
});
</script>
<?php 
if ($model->statusCode=='step1')
	
{
	$options=array(
				//'collapsible'=>true,
				'selected'=>1,
				"disabled"=>array(2),
			);
}else if ($model->statusCode=='step2'){
	$options=array(
			//'collapsible'=>true,
			'selected'=>2,
			//"disabled"=>[2],
	);
}else if ($model->statusCode=='step6'){
	$options=array(
			//'collapsible'=>true,
			'selected'=>1,
			//"disabled"=>[2],
	);
}else{
	$options=array(
			//'collapsible'=>true,
			'selected'=>2,
			//"disabled"=>[2],
	);
}
$this->widget('zii.widgets.jui.CJuiTabs',array(
		'tabs'=>array(
				'เสนอโครงการ'=>$model->isNewRecord ? $this->renderPartial("_form", array('model'=>$model),$this) : $this->renderPartial("detail", array('model'=>$model),$this),
				'ยื่นขอสอบ'=>($model->statusCode=='step1'||$model->statusCode=='step6') ? $this->renderPartial("_examForm", array('commit3'=>$commit3,'commit2'=>$commit2,'commit1'=>$commit1,'model'=>$newExam,'regTeacher1'=>$regTeacher1,'regTeacher2'=>$regTeacher2,'regTeacher3'=>$regTeacher3),$this) : $this->renderPartial("//exam/viewExam", array('model'=>$model->exams),$this),
				'อนุมัติโครงการ'=>($model->statusCode=='step1')?'no data':($model->statusCode=='step2'||$model->statusCode=='step7') ? $this->renderPartial("_resultExamForm", array('model'=>$exam),$this) : $this->renderPartial("//exam/viewResult", array('model'=>$model->exams),$this),
		),
		// additional javascript options for the tabs plugin
		'options'=>$options,
));
?>
<?php echo $this->renderPartial("_reportForm");?>
<?php echo $this->renderPartial("_attachmentForm");?>
<?php echo $this->renderPartial("_notifyForm");?>
